import * as Actions from "../Actions";

/**
 * Created by xst on 2018/4/13.
 */

export const addTabNav = (key, title = '', keyPath = []) => ({
	type: 'ADD_TAB_NAV',
	key,
	title,
	keyPath,
});

export const changeTabNav = key => ({
	type: 'CHANGE_TAB_NAV',
	key
});

export const removeTabNav = key => ({
	type: 'REMOVE_TAB_NAV',
	key
})

/**
 *
 * @param result {{menusTree:[], mapUrl:{}}}
 * @returns {{type: string, result: *}}
 */
export const setMenu = result => ({
	type: Actions.setMenu,
	result
})
